package cn.inyaa.admin.blog.dao;

import cn.inyaa.admin.blog.bean.InyaaBlogTag;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface InyaaBlogTagDao extends JpaRepository<InyaaBlogTag, Integer> {

    void deleteByBlogId(Integer blogId);

    @Query("select tagId from InyaaBlogTag where blogId = ?1")
    List<Integer> findTagList(Integer id);

    List<InyaaBlogTag> findByBlogId(Integer blogId);
}
